package ar.rhok.yerbus.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import ar.rhok.yerbus.core.services.NeedService;
import ar.rhok.yerbus.core.services.UserService;

import com.vaadin.Application;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

@Component
public class MainApp extends Application {

	@Autowired
	private UserService userService;

	@Autowired
	private NeedService needService;
	
	public void init() {

		Window w = new Window();
		setMainWindow(w);
		
		TabSheet t = new TabSheet();
		
		VerticalLayout needsRequest = new VerticalLayout();
		t.addTab(needsRequest);
		t.getTab(needsRequest).setCaption("Needs and requests");		
		w.addComponent(t);

		VerticalLayout userRegistration = new VerticalLayout();
		t.addTab(userRegistration);
		t.getTab(userRegistration).setCaption("User registration");		
		w.addComponent(t);
		
		VerticalLayout RequestApprobation = new VerticalLayout();
		t.addTab(RequestApprobation);
		t.getTab(RequestApprobation).setCaption("Request Approbation");		
		w.addComponent(t);

	}

}
